home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
LANG
/
GOFER
/
!Gofer
/
History
< prev
next >
Wrap
Text File
|
1994-06-14
|
4KB
|
127 lines
! G.C.Wraith 14/06/94 !
This version of Gofer has been compiled from the sources for
Gofer v2.30, obtained by ftp from nebula@cs.yale.edu, with
the following modifications, aimed at improving the use of
Gofer in an !Edit taskwindow:
1) A small object file o.vsynch, created with Express Assembler,
is linked with the object files created by compiling the
standard v2.30 sources. See below for the source.
2) An extra header file h.vsynch is used to perform the linking.
Its contents are:
/* h.vsynch */
extern int taskwin_query(void); /* are we in a taskwindow? */
extern int vsynch_off(void); /* disable vsynch events */
extern void vsynch_on(int); /* enable vsynch events */
#define VSYNCH_DISABLE if (taskwindow) vs_en = vsynch_off()
#define VSYNCH_ENABLE if (taskwindow) vsynch_on(vs_en)
/**************************************************************
* use as
*
* int vsynch_count;
* vsynch_count = vsynch_off();
* < fast bits here >
* vsynch_on(vsynch_count);
**************************************************************/
3) The file c.gofer is modified as follows:
An extra symbol TASKWIN is used to control inclusion of new code
which disables the vertical-synch event when evaluation takes
place. This prevents the evaluation thread from being pre-empted
by the taskwindow. When evaluation finishes, or an error occurs,
the event is re-enabled with the semaphore saved by the disabling
code.
In accordance with RiscOS tradition, shell escapes can also be
introduced using * (instead of the Unix-traditional !).
4) The file c.prims has been modified as follows:
primAsinFloat and primAcosFloat now produce an error gracefully
if presented with an argument of absolute value greater than one.
primExpFloat produces an error gracefully if presented with an
argument that is too large for the floating point representation
of the result.
5) To accommodate the narrower width of the taskwindow, the progress-
to-completion output (.....) has been replaced by:
Parsing -> Dependency analysis -> Type checking -> Compiling ->
The make-file must be modified to include the option -DTASKWIN and
to mention the dependencies on o.vsynch and h.vsynch, when recompiling.
The desktop front end uses filetypes for scripts, projects and preludes.
These types are held in the system variables:
Gofer_Script$, Gofer_Project$, Gofer_Prelude$
I applied to Acorn for official recognition for the values chosen,
but I am not sure whether recognition has been granted.
The run-action of a prelude file is to be made the default prelude.
The run-action of a script or project file is to be loaded into
Gofer, with Gofer being started up if necessary. Only one taskwindow
running Gofer can be open at a time. Choosing quit from the iconbar
also closes the taskwindow. Text files can be loaded as scripts by
being dragged to the iconbar icon. Scripts and projects can also be
loaded this way, of course.
The front end is written in Basic. It must have "!RunImage" as file
name. It provides interactive help.
The following is a source listing of vsynch, provided for those who
want to compile their own versions:
; Express Assembler Source for vsynch
SETTYPE "Data"
OBJECT "vsynch"
AREA "VSYNCH",CODE+READONLY
EQU Disable_event,13
EQU Enable_event,14
EQU Vsynch_event,4
taskwin_query
MOV R0,#0
SWI "XTaskWindow_TaskInfo"
MOVS PC,R14
vsynch_off
MVN R3,#0
loop1
ADD R3,R3,#1
MOV R0,#Disable_event
MOV R1,#Vsynch_event
SWI "XOS_Byte"
CMP R1,#0
BNE loop1
MOV R0,R3
MOVS PC,R14
vsynch_on
MOVS R3,R0
MOVEQS PC,R14
loop2
MOV R0,#Enable_event
MOV R1,#Vsynch_event
SWI "XOS_Byte"
SUBS R3,R3,#1
BNE loop2
MOVS PC,R14
EXPORT taskwin_query
EXPORT vsynch_off
EXPORT vsynch_on
END
---- end ---------------